<%@ Page Language="C#" MasterPageFile="~/TreyResearchOnlineEMR.Master" AutoEventWireup="true"
    CodeFile="ProviderRegistration.aspx.cs" Inherits="ProviderRegistration" Title="Trey Research - Provider Registration" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">

    <script language="javascript" type="text/javascript">
function DisableSubmitbutton()
{
var submitbutton=document.getElementById('ctl00_MainContentPlaceHolder_ButtonSignIn');
submitbutton.disabled=true;
}
    </script>

    <table class="PageFont" id="TABLE1">
        <tr>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="right" style="width: 10px">
            </td>
            <td align="left" class="Margin">
                <asp:Label ID="LabelErrorMessage" runat="server" CssClass="ErrorMessage"></asp:Label></td>
            <td align="center" rowspan="1" valign="top">
            </td>
            <td align="center" rowspan="1" valign="top">
            </td>
            <td align="center" rowspan="1" valign="top">
            </td>
            <td align="center" rowspan="1" valign="top">
            </td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="LabelProviderName" runat="server" Text="Provider Name"></asp:Label><span
                    class="Mandatory">*</span></td>
            <td align="left" style="width: 10px">
            </td>
            <td align="left" valign="top">
                <asp:TextBox ID="TextBoxProviderName" runat="server" CssClass="TextBox" Width="200px"
                    TabIndex="1"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorProviderName" runat="server"
                    ControlToValidate="TextBoxProviderName" ErrorMessage="Provider Name is required"
                    CssClass="PageFont" Display="Dynamic" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            <td align="left">
            </td>
            <td align="left" valign="top" style="width: 96px">
                <asp:Label ID="LabelLogo" runat="server" Text="Large Logo"></asp:Label><span class="Mandatory">*</span></td>
            <td align="left">
            </td>
            <td align="left" valign="top">
                <asp:FileUpload ID="FileUploadLogo" runat="server" CssClass="registraionDropdown"
                    TabIndex="2" Width="290px" />
            </td>
        </tr>
        <tr>
            <td align="right" class="Margin">
            </td>
            <td align="right" valign="top">
            </td>
            <td align="right" style="width: 10px">
            </td>
            <td align="left" valign="top">
            </td>
            <td align="right" style="width: 10px">
            </td>
            <td align="right">
            </td>
            <td align="right" style="width: 10px">
            </td>
            <td align="left">
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorUploadFile" runat="server"
                    ErrorMessage="Large logo file path required:" ControlToValidate="FileUploadLogo"
                    Display="Dynamic" SetFocusOnError="true" CssClass="TextBox"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td align="right" valign="top" style="height: 106px">
            </td>
            <td align="left" valign="top" style="height: 106px">
                <asp:Label ID="LabelProviderDescription" runat="server" Text="Provider Description"></asp:Label><span
                    style="color: #ff0000">*</span></td>
            <td align="left" style="width: 10px; height: 106px;" valign="top">
            </td>
            <td align="left" valign="top" style="height: 106px">
                <asp:TextBox ID="TextBoxProviderDescription" runat="server" CssClass="registraionDropdown"
                    Height="80px" TextMode="MultiLine" Width="200px" TabIndex="3"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorProvDesc" runat="server" ControlToValidate="TextBoxProviderDescription"
                    CssClass="TextBox" Display="Dynamic" ErrorMessage="Type Description for provider"
                    SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            <td align="left" rowspan="1" style="width: 10px; height: 106px;" valign="top">
            </td>
            <td align="left" rowspan="1" valign="top" style="height: 106px;">
                <asp:Label ID="LabelPrivacyStatement" runat="server" Text="Privacy Statement"></asp:Label><span
                    class="Mandatory"></span></td>
            <td align="left" rowspan="1" style="width: 10px; height: 106px;" valign="top">
            </td>
            <td align="left" rowspan="1" valign="top" style="height: 106px">
                <asp:TextBox ID="TextBoxPrivacyStatement" runat="server" CssClass="registraionDropdown"
                    TextMode="MultiLine" Width="200px" Height="80px" TabIndex="4"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="LabelUserName" runat="server" Text="User Name"></asp:Label>
                <span class="Mandatory">*</span></td>
            <td align="left" style="width: 10px">
            </td>
            <td align="left" valign="top">
                <asp:TextBox ID="TextBoxUsername" runat="server" CssClass="registraionDropdown" Width="200px"
                    TabIndex="5"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorUserName" runat="server" ControlToValidate="TextBoxUsername"
                    ErrorMessage="User Name is required" CssClass="TextBox" Width="150px" Display="Dynamic"
                    SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            <td align="left" style="width: 10px">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="LabelActionURL" runat="server" CssClass="TextBox" Text="Action URL"></asp:Label><span
                    class="Mandatory"></span></td>
            <td align="left" style="width: 10px">
            </td>
            <td align="left" valign="top">
                <asp:TextBox ID="TextBoxActionURL" runat="server" CssClass="TextBox" TabIndex="8"
                    Width="200px"></asp:TextBox>
                <asp:RegularExpressionValidator Display="Dynamic" ID="RegularExpressionValidatorActionURL"
                    runat="server" ErrorMessage="Type valid URL" ControlToValidate="TextBoxActionURL"
                    ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator></td>
        </tr>
        <tr>
            <td align="right" style="height: 41px">
            </td>
            <td align="left" valign="top" style="height: 41px">
                <asp:Label ID="LabelPassword" runat="server" Text="Password"></asp:Label>
                <span class="Mandatory">*</span></td>
            <td align="left" style="width: 10px; height: 41px;">
            </td>
            <td align="left" valign="top" style="height: 41px">
                <asp:TextBox ID="TextBoxPassword" runat="server" TextMode="Password" CssClass="registraionDropdown"
                    Width="200px" TabIndex="6">*</asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorPassword" runat="server" ErrorMessage="Password is required"
                    ControlToValidate="TextBoxPassword" Display="Dynamic" SetFocusOnError="True"
                    CssClass="TextBox"></asp:RequiredFieldValidator></td>
            <td align="left" rowspan="3" style="width: 10px" valign="top">
            </td>
            <td align="left" rowspan="3" valign="top">
                <asp:Label ID="LabelAuthorizationReason" runat="server" Text="Authorization Reason"></asp:Label><span
                    class="Mandatory">*</span></td>
            <td align="left" rowspan="3" style="width: 10px" valign="top">
            </td>
            <td align="left" rowspan="3" valign="top">
                <asp:TextBox ID="TextBoxAuthorizationReason" runat="server" CssClass="TextBox" TabIndex="9"
                    Width="200px" Height="131px" TextMode="MultiLine"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorAuthorizationReason" runat="server"
                    ControlToValidate="TextBoxAuthorizationReason" Display="Dynamic" ErrorMessage="Type authorization reason"
                    SetFocusOnError="True" CssClass="TextBox"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="Labelconfirm" runat="server" Text="Confirm Password"></asp:Label><span
                    class="Mandatory">*</span></td>
            <td align="left" style="width: 10px">
            </td>
            <td align="left" valign="top">
                <asp:TextBox ID="TextBoxConfirmPassword" runat="server" CssClass="registraionDropdown"
                    TextMode="Password" Width="200px" TabIndex="7"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidatorConfirmPassword" runat="server"
                    ErrorMessage="Type password for confirmation" ControlToValidate="TextBoxConfirmPassword"
                    Display="Dynamic"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidatorConfirmPassword" runat="server" ControlToValidate="TextBoxConfirmPassword"
                    ErrorMessage="Password does not match" ControlToCompare="TextBoxPassword" Display="Dynamic"
                    SetFocusOnError="True" CssClass="TextBox"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td align="right" valign="top">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="LabelTermsofUse" runat="server" Text="Terms of Use"></asp:Label></td>
            <td align="left" style="width: 10px" valign="top">
            </td>
            <td align="left" valign="top">
                <asp:TextBox ID="TextBoxTermsofUse" runat="server" CssClass="registraionDropdown"
                    TextMode="MultiLine" Width="200px" Height="80px" TabIndex="10"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="right" class="Margin" valign="top">
            </td>
            <td align="right" valign="top" style="width: 150px">
            </td>
            <td align="right" style="width: 10px" valign="top">
            </td>
            <td align="left">
            </td>
            <td align="center" colspan="1" rowspan="1" valign="top">
            </td>
            <td align="center" colspan="3" rowspan="1" valign="top">
                &nbsp; &nbsp; &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" valign="top">
            </td>
            <td align="left" valign="top">
                <asp:Label ID="LabelProviderPractice" runat="server" Text="Provider Practice"></asp:Label><span
                    class="Mandatory">*</span></td>
            <td align="left" style="width: 10px" valign="top">
            </td>
            <td align="left" valign="top" colspan="5">
                <table style="width: 425px;" border="1" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width: 201px; height: 17px;" class="TableGridHeader">
                            &nbsp;Item
                        </td>
                        <td style="width: 50px; height: 17px;" align="center" class="TableGridHeader">
                            Create</td>
                        <td style="width: 50px; height: 17px;" align="center" class="TableGridHeader">
                            Read</td>
                        <td style="width: 50px; height: 17px;" align="center" class="TableGridHeader">
                            Update</td>
                        <td style="width: 50px; height: 17px;" align="center" class="TableGridHeader">
                            Delete</td>
                        <td style="width: 24px; height: 17px;" align="center" class="TableGridHeader">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 133px">
                            <asp:Panel ID="Panel1" runat="server" Height="116px" ScrollBars="Vertical" Width="425px">
                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                                    OnRowDataBound="GridView1_RowDataBound" TabIndex="11" Width="400px" ShowHeader="False"
                                    PageSize="11">
                                    <Columns>
                                        <asp:BoundField DataField="Item" HeaderText="Item">
                                            <ItemStyle Width="200px" />
                                        </asp:BoundField>
                                        <asp:TemplateField HeaderText="Create">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="Create" Checked='<%# Bind("Create") %>' />
                                            </ItemTemplate>
                                            <ItemStyle Width="50px" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Read">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="Read" Checked='<%# Bind("Read") %>' />
                                            </ItemTemplate>
                                            <ItemStyle Width="50px" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Update">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="Update" Checked='<%# Bind("Update") %>' />
                                            </ItemTemplate>
                                            <ItemStyle Width="50px" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Delete">
                                            <ItemTemplate>
                                                <asp:CheckBox runat="server" ID="Delete" Checked='<%# Bind("Delete") %>' />
                                            </ItemTemplate>
                                            <ItemStyle Width="50px" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="TypeId" HeaderText="TypeID"></asp:BoundField>
                                    </Columns>
                                </asp:GridView>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="right" class="Margin">
            </td>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="left" class="Mandatory">
            </td>
            <td align="center" colspan="1" rowspan="1" valign="top">
            </td>
            <td align="center" colspan="3" rowspan="1" valign="top">
            </td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="left" class="Mandatory">
                <asp:Literal ID="LiteralWarning" runat="server" Text="Fields marked with * are mandatory"></asp:Literal></td>
            <td align="center" colspan="1" rowspan="1" valign="top">
            </td>
            <td align="center" colspan="3" rowspan="1" valign="top">
            </td>
        </tr>
        <tr>
            <td align="right" class="Margin">
            </td>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="left" class="Mandatory">
            </td>
            <td align="center" colspan="1" rowspan="1" valign="top">
            </td>
            <td align="center" colspan="3" rowspan="1" valign="top">
            </td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="right">
            </td>
            <td align="left" valign="top">
                <table>
                    <tr>
                        <td align="left" style="width: 158px">
                            <asp:Button ID="ButtonSignIn" runat="server" CssClass="Button" OnClick="LinkButtonSignIn_Click"
                                TabIndex="12" Text="Generate Application" Width="150px" ToolTip="Create new Provider (Generate new child application id)." />
                        </td>
                        <td align="right" style="width: 10px">
                        </td>
                        <td align="right">
                            <asp:Button ID="ButtonCancel" runat="server" CssClass="Button" OnClick="LinkButtonCancel_Click"
                                TabIndex="13" Text="Cancel" CausesValidation="False" ToolTip="Return to login page" /></td>
                    </tr>
                </table>
            </td>
            <td align="center" colspan="1" rowspan="1" valign="top">
            </td>
            <td align="center" rowspan="1" valign="top" colspan="3">
                &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
